// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             (unknown)
// source: auth.proto

package proto

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

// AuthApiClient is the client API for AuthApi service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type AuthApiClient interface {
	Register(ctx context.Context, in *InputRegisterLogin, opts ...grpc.CallOption) (*ResponseData, error)
	Login(ctx context.Context, in *InputRegisterLogin, opts ...grpc.CallOption) (*ResponseData, error)
	Logout(ctx context.Context, in *InputLogoutRefresh, opts ...grpc.CallOption) (*ResponseLogoutData, error)
	Refresh(ctx context.Context, in *InputLogoutRefresh, opts ...grpc.CallOption) (*ResponseData, error)
}

type authApiClient struct {
	cc grpc.ClientConnInterface
}

func NewAuthApiClient(cc grpc.ClientConnInterface) AuthApiClient {
	return &authApiClient{cc}
}

func (c *authApiClient) Register(ctx context.Context, in *InputRegisterLogin, opts ...grpc.CallOption) (*ResponseData, error) {
	out := new(ResponseData)
	err := c.cc.Invoke(ctx, "/blog_auth.v1.AuthApi/Register", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *authApiClient) Login(ctx context.Context, in *InputRegisterLogin, opts ...grpc.CallOption) (*ResponseData, error) {
	out := new(ResponseData)
	err := c.cc.Invoke(ctx, "/blog_auth.v1.AuthApi/Login", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *authApiClient) Logout(ctx context.Context, in *InputLogoutRefresh, opts ...grpc.CallOption) (*ResponseLogoutData, error) {
	out := new(ResponseLogoutData)
	err := c.cc.Invoke(ctx, "/blog_auth.v1.AuthApi/Logout", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *authApiClient) Refresh(ctx context.Context, in *InputLogoutRefresh, opts ...grpc.CallOption) (*ResponseData, error) {
	out := new(ResponseData)
	err := c.cc.Invoke(ctx, "/blog_auth.v1.AuthApi/Refresh", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// AuthApiServer is the server API for AuthApi service.
// All implementations must embed UnimplementedAuthApiServer
// for forward compatibility
type AuthApiServer interface {
	Register(context.Context, *InputRegisterLogin) (*ResponseData, error)
	Login(context.Context, *InputRegisterLogin) (*ResponseData, error)
	Logout(context.Context, *InputLogoutRefresh) (*ResponseLogoutData, error)
	Refresh(context.Context, *InputLogoutRefresh) (*ResponseData, error)
	mustEmbedUnimplementedAuthApiServer()
}

// UnimplementedAuthApiServer must be embedded to have forward compatible implementations.
type UnimplementedAuthApiServer struct {
}

func (UnimplementedAuthApiServer) Register(context.Context, *InputRegisterLogin) (*ResponseData, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Register not implemented")
}
func (UnimplementedAuthApiServer) Login(context.Context, *InputRegisterLogin) (*ResponseData, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
}
func (UnimplementedAuthApiServer) Logout(context.Context, *InputLogoutRefresh) (*ResponseLogoutData, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Logout not implemented")
}
func (UnimplementedAuthApiServer) Refresh(context.Context, *InputLogoutRefresh) (*ResponseData, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Refresh not implemented")
}
func (UnimplementedAuthApiServer) mustEmbedUnimplementedAuthApiServer() {}

// UnsafeAuthApiServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AuthApiServer will
// result in compilation errors.
type UnsafeAuthApiServer interface {
	mustEmbedUnimplementedAuthApiServer()
}

func RegisterAuthApiServer(s grpc.ServiceRegistrar, srv AuthApiServer) {
	s.RegisterService(&AuthApi_ServiceDesc, srv)
}

func _AuthApi_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(InputRegisterLogin)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AuthApiServer).Register(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/blog_auth.v1.AuthApi/Register",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AuthApiServer).Register(ctx, req.(*InputRegisterLogin))
	}
	return interceptor(ctx, in, info, handler)
}

func _AuthApi_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(InputRegisterLogin)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AuthApiServer).Login(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/blog_auth.v1.AuthApi/Login",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AuthApiServer).Login(ctx, req.(*InputRegisterLogin))
	}
	return interceptor(ctx, in, info, handler)
}

func _AuthApi_Logout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(InputLogoutRefresh)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AuthApiServer).Logout(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/blog_auth.v1.AuthApi/Logout",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AuthApiServer).Logout(ctx, req.(*InputLogoutRefresh))
	}
	return interceptor(ctx, in, info, handler)
}

func _AuthApi_Refresh_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(InputLogoutRefresh)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AuthApiServer).Refresh(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/blog_auth.v1.AuthApi/Refresh",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AuthApiServer).Refresh(ctx, req.(*InputLogoutRefresh))
	}
	return interceptor(ctx, in, info, handler)
}

// AuthApi_ServiceDesc is the grpc.ServiceDesc for AuthApi service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var AuthApi_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "blog_auth.v1.AuthApi",
	HandlerType: (*AuthApiServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Register",
			Handler:    _AuthApi_Register_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _AuthApi_Login_Handler,
		},
		{
			MethodName: "Logout",
			Handler:    _AuthApi_Logout_Handler,
		},
		{
			MethodName: "Refresh",
			Handler:    _AuthApi_Refresh_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "auth.proto",
}
